﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Culture="auto" meta:resourcekey="PageResource1" UICulture="auto" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>新会工商局绩效管理系统</title>
    <script src="Scripts/common.js" type="text/jscript"></script>
    <script src="Scripts/form.js" type="text/jscript"></script>
    <link href="App_Themes/default/Login.css" type="text/css" rel="stylesheet" />
    <link href="App_Themes/default/Other.css" type="text/css" rel="stylesheet" />
    <link href="App_Themes/default/Style.css" type="text/css" rel="stylesheet" />
    <link href="App_Themes/default/webpart.css" type="text/css" rel="stylesheet" />    
</head>
<body id="login" scroll="no">
    <form id="form1" runat="server">

    <script type="text/javascript">
        function closePage(bForce) {
            // 骗浏览器，不用提示确认是否关闭（部分浏览器有效）
            if (bForce == true) {
                try { window.open('', '_parent', ''); } catch (e) { }
            }
            $$("<%=lblErrorInfo.ClientID%>").innerHTML = "如果页面没有关闭，请点击窗口右上角的关闭按钮。";
            window.close();
            return false;
        }
        // 如果是在对话框里面，提示关闭对话框

        if (window.dialogHeight) {
            alert("会话已过期,请重新登录。");
            closePage();
        } else if (window.frameElement) {
            // 如果此页面在框架里面，跳出框架，登录后回原页
            top.location.href = top.location.href;
        }
        window.attachEvent("onload", function() {
            // 为输入框设置焦点
            var obj = $$("<%=txtName.ClientID%>");
            if (obj && obj.value.length == 0) {
                obj.focus();
            } else {
                $$("<%=txtPassword.ClientID%>").focus();
            }
        });
    </script>
    
     <script language="javascript" type="text/javascript">
     function getcode()
       {
        var timenow = new Date().getTime();
        document.getElementById("val").src="ValidImg.aspx?Type=Login&rd="+timenow;
       }
      
    </script>


    <div class="container_cn" id="container">
        <div class="header">
            <h1>
                <asp:Label ID="lblHeader" runat="server" Text="贝讯通信" ></asp:Label>
            </h1>
           
        </div>
        <div class="content">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <asp:Label ID="lblUserName" runat="server" Text=" 用户名(U):" ></asp:Label>

                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txtName" Text="admin"
                            AccessKey="U" Width="131px" ValidationGroup="login" />
                    </td>
                </tr>
                 <tr>
                    <th>
                    </th>
                    <td>
                    </td>
                    </tr>
                <tr>
                    <td>
                        
                    <asp:Label ID="lblPassword" runat="server" Text="密&nbsp;&nbsp;码(P):" ></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox TextMode="Password" runat="server" Text="admin"
                            ID="txtPassword" AccessKey="P" Width="131px" ValidationGroup="login"  />
                    </td>
                </tr>
                   
                      <tr>
                    <td>                      
                        <asp:Label ID="lblValidImg" runat="server" Text=" 验证码(V):" ></asp:Label>  
                    </td>
                    <td>
                        <asp:TextBox ID="txtValidCode" runat="server" MaxLength="20" Width="131px" ValidationGroup="login" Text="12345" ></asp:TextBox>
                        
                        <img src="ValidImg.aspx?Type=Login" id="val" alt="" style="cursor: hand;" onclick="getcode();" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ValidationGroup="login" runat="server" ControlToValidate="txtValidCode"
                            ErrorMessage="*" ></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <th>
                    </th>
                    <td>
                        <asp:Label ID="lblErrorInfo" runat="server" CssClass="com_error" ></asp:Label>
                    </td>
                </tr>
                <tfoot>
                    <tr>
                        <th>
                        </th>
                        <td>
                            <asp:Button ID="btnLogin" runat="server" Text="登录" OnClick="btnLogin_Click" ValidationGroup="login"  />
                            <asp:Button ID="btnClose" runat="server" Text="取消" OnClientClick="btnClose_Click"  />
                        </td>
                    </tr>
                </tfoot>
            </table>
        </div>       
    </div>
    <div class="extraDiv1">
        <span></span>
    </div>
    <div class="extraDiv2">
        <span></span>
    </div>
    <div class="extraDiv3">
        <span></span>
    </div>
    </form>
</body>
</html>
